<?php $this->load->view('home/layout/header') ?>
<div class="widthMax">
    <div class="new-img">
        <a href="<?php echo isset($_SERVER['HTTP_REFERER']) ? 'javascript:history.go(-1);' : site_url('home/winners/grid'); ?>" class="drax-return">
            <i class="iconfont icon-zuojiantou"></i>
        </a>
        <a href="<?php echo site_url(); ?>" class="drax-beizhu">
            <i class="iconfont">&#xe616;</i>
        </a>
        <?php if ( !empty($winner->links)) : ?>
        <div class="new-zanzhushang"><a href="<?php echo $winner->links; ?>">去奖品站点看看 ></a></div>
        <?php endif; ?>
        <div class="new-text">
            <p>恭喜您！已获得</p>
            <p><?php echo $winner->prize_name; ?></p>
            <img src="<?php echo $this->config->show_image_url($winner->image, '300-300'); ?>">
        </div>
        <div class="new-label">
            <h3>请正确填写如下信息：</h3>
            <p class="new-span">(以便我们快速准确地发放奖品)</p>
        </div>
    </div>
    <div class="new-form">
        <form id="form-accept-prize" action="<?php echo site_url('home/winners/acceptPrizePost'); ?>" method="post">
            <input type="hidden" name="id" value="<?php echo $winner->id; ?>" >
            <input type="hidden" name="province_name" >
            <input type="hidden" name="city_name" >
            <input type="hidden" name="district_name" >
            <table class="form-table am-table">
                <tbody>
                <tr>
                    <td class="form-label">真实姓名</td>
                    <td>
                        <input type="text" name="receiver_name" placeholder="收货人姓名">
                    </td>
                </tr>
                <tr>
                    <td class="form-label">手机号码</td>
                    <td>
                        <input type="text" name="tel" placeholder="手机号码" >
                    </td>
                </tr>
                <tr>
                    <td class="form-label">邮政邮编</td>
                    <td>
                        <input type="text" name="code" placeholder="邮政邮编" >
                    </td>
                </tr>
                <tr>
                    <td class="form-label">省</td>
                    <td>
                        <select name="province_id">
                            <option value="0">省份</option>
                            <?php foreach($province->result() as $value) : ?>
                            <option value="<?php echo $value->region_id; ?>"><?php echo $value->region_name; ?></option>
                            <?php endforeach ?>
                        </select>
                    </td>
                </tr>
                <tr>
                    <td class="form-label">市</td>
                    <td>
                        <select name="city_id" >
                            <option value="0">城市</option>
                        </select>
                    </td>
                </tr>
                <tr>
                    <td class="form-label">区</td>
                    <td>
                        <select name="district_id">
                            <option value="0">区域</option>
                        </select>
                    </td>
                </tr>
                <tr>
                    <td class="form-label">详细地址</td>
                    <td>
                        <input type="text" name="detailed" placeholder="详细地址">
                    </td>
                </tr>
                <tr>
                    <td class="form-label"></td>
                    <td>
                        <button type="submit">提交</button>
                    </td>
                </tr>
                </tbody>
            </table>
        </form>
    </div>
</div>
<?php echo $this->load->view('home/layout/footer'); ?>
<?php js('home', 'pages/lottery')?>
